/*
 * This file is part of ZSWatch project <https://github.com/zswatch/>.
 * Copyright (c) 2025 ZSWatch Project.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <inttypes.h>
#include <stdbool.h>

void zsw_display_control_init(void);
int zsw_display_control_sleep_ctrl(bool on);
int zsw_display_control_pwr_ctrl(bool on);
void zsw_display_control_set_brightness(uint8_t percent);
uint8_t zsw_display_control_get_brightness(void);

/*
* Set LVGL rendering on or off.
* When rendering is off, lv_task_handler will not be called periodically.
* Needed when working with the LVGL image resources so LVGL does not
* try to render while the image data is being updated.
*/
int zsw_display_control_set_render_enabled(bool on);